package com.ajl.wx.config;

public class UrlConfig {
    public static final String code2Session="https://api.weixin.qq.com/sns/jscode2session?appid={APPID}&secret={SECRET}&js_code={JSCODE}&grant_type=authorization_code";

    public static String buildCode2Session(WebApplicationProperties webApplicationProperties,String jsCode){
        String url = UrlConfig.code2Session;
        url=url.replace("{APPID}",webApplicationProperties.getAppId());
        url=url.replace("{SECRET}",webApplicationProperties.getAppSecret());
        url=url.replace("{JSCODE}",jsCode);
        return url;
    }
}
